import dao.ResourceDAO;
import domain.Resource;
import domain.util.TypesResource;

public class TestCreateResource {

	public static void main(String[] args) {
		Resource r = new Resource(); //ResourceDAO.getResourcesBy("creator", "Mozeggs").get(0);
			
		
		r.setTitle("Meu titulo novo four");
		r.setCreator("Nando Reis");
		r.setType(TypesResource.Article);
		
		new ResourceDAO().save(r);
		
		/*Unit u = new Unit();
		u.setUnitId("1234");
		u.setResource(r);
		
		UnitDAO.save(u);
			
		Keyword k = new Keyword();
		k.setKeyword("ARQUITETURA");
		
		r.getKeywords().add(k);
		
		new ResourceDAO().save(r);
		
		for (Keyword k : r.getKeywords()) {
			System.out.println(k.getKeyword());
		}*/
//		System.out.println(r.getKeywords());
//		System.out.println(r.getUnits());
	}
	
}
